package create.abstractfactory.abstract_factory_demo1;

/**
 * @author yeyangtao
 * @date 2020/5/20 17:27
 */
public class AbstractFactoryDemo {

    public static void main(String[] args) {
        AbstractFactory colorFactory = FactoryProduce.getFactory("color");
        AbstractFactory shapeFactory = FactoryProduce.getFactory("shape");

        assert colorFactory != null;
        colorFactory.getColor("red").fill();

        assert shapeFactory != null;
        shapeFactory.getShape("circle").draw();
    }
}
